// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-01-05 17:57:11
// 生成路径: api/v1/flow/flow_model.go
// 生成人：gfast
// desc:流程模型相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package flow

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/flow/model"
)

// FlowModelSearchReq 分页请求参数
type FlowModelSearchReq struct {
	g.Meta `path:"/list" tags:"流程管理/流程模型" method:"get" summary:"流程模型列表"`
	commonApi.Author
	model.FlowModelSearchReq
}

// FlowModelSearchRes 列表返回结果
type FlowModelSearchRes struct {
	g.Meta `mime:"application/json"`
	*model.FlowModelSearchRes
}

// FlowModelExportReq 导出请求
type FlowModelExportReq struct {
	g.Meta `path:"/export" tags:"流程管理/流程模型" method:"get" summary:"流程模型导出"`
	commonApi.Author
	model.FlowModelSearchReq
}

// FlowModelExportRes 导出响应
type FlowModelExportRes struct {
	commonApi.EmptyRes
}
type FlowModelExcelTemplateReq struct {
	g.Meta `path:"/excelTemplate" tags:"流程管理/流程模型" method:"get" summary:"导出模板文件"`
	commonApi.Author
}
type FlowModelExcelTemplateRes struct {
	commonApi.EmptyRes
}
type FlowModelImportReq struct {
	g.Meta `path:"/import" tags:"流程管理/流程模型" method:"post" summary:"流程模型导入"`
	commonApi.Author
	File *ghttp.UploadFile `p:"file" type:"file" dc:"选择上传文件"  v:"required#上传文件必须"`
}
type FlowModelImportRes struct {
	commonApi.EmptyRes
}

// 相关连表查询数据
type LinkedFlowModelDataSearchReq struct {
	g.Meta `path:"/linkedData" tags:"流程管理/流程模型" method:"get" summary:"流程模型关联表数据"`
	commonApi.Author
}

// 相关连表查询数据
type LinkedFlowModelDataSearchRes struct {
	g.Meta `mime:"application/json"`
	*model.LinkedFlowModelDataSearchRes
}

// FlowModelAddReq 添加操作请求参数
type FlowModelAddReq struct {
	g.Meta `path:"/add" tags:"流程管理/流程模型" method:"post" summary:"流程模型添加"`
	commonApi.Author
	*model.FlowModelAddReq
}

// FlowModelAddRes 添加操作返回结果
type FlowModelAddRes struct {
	commonApi.EmptyRes
}

// FlowModelEditReq 修改操作请求参数
type FlowModelEditReq struct {
	g.Meta `path:"/edit" tags:"流程管理/流程模型" method:"put" summary:"流程模型修改"`
	commonApi.Author
	*model.FlowModelEditReq
}

// FlowModelEditRes 修改操作返回结果
type FlowModelEditRes struct {
	commonApi.EmptyRes
}

// FlowModelGetReq 获取一条数据请求
type FlowModelGetReq struct {
	g.Meta `path:"/get" tags:"流程管理/流程模型" method:"get" summary:"获取流程模型信息"`
	commonApi.Author
	Id uint64 `p:"id" v:"required#主键必须"` //通过主键获取
}

// FlowModelGetRes 获取一条数据结果
type FlowModelGetRes struct {
	g.Meta `mime:"application/json"`
	*model.FlowModelInfoRes
}

// FlowModelDeleteReq 删除数据请求
type FlowModelDeleteReq struct {
	g.Meta `path:"/delete" tags:"流程管理/流程模型" method:"delete" summary:"删除流程模型"`
	commonApi.Author
	Ids []uint64 `p:"ids" v:"required#主键必须"` //通过主键删除
}

// FlowModelDeleteRes 删除数据返回
type FlowModelDeleteRes struct {
	commonApi.EmptyRes
}

type FlowModelNodeSaveReq struct {
	g.Meta `path:"/saveModelNode" tags:"流程管理/流程模型" method:"post" summary:"保存流程模型节点信息"`
	commonApi.Author
	ModelId uint64                       `p:"modelId" v:"required#模型ID参数必须"`
	Nodes   []*model.FlowModelNodeAddReq `p:"nodes"`
	Edges   []*model.FlowNodeLineAddReq  `p:"edges"`
}

type FlowModeNodeSaveRes struct {
	commonApi.EmptyRes
}

type FlowModelNodeInfoGetReq struct {
	g.Meta `path:"/getModelNode" tags:"流程管理/流程模型" method:"get" summary:"获取流程模型节点信息"`
	commonApi.Author
	ModelId uint64 `p:"modelId" v:"required#模型ID参数必须"`
}

type FlowModelNodeInfoGetRes struct {
	commonApi.EmptyRes
	*model.NodeInfoRes
}
